package com.world.tg.param;

import com.world.tg.pojo.BaseObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.sql.Date;

@Data
@ApiModel("注册参数")
public class RegisterOrLoginParam extends BaseObject {
    @ApiModelProperty("用户名")
    private String username;
    @ApiModelProperty("盐值(不需要传，由后台生成)")
    private String salt;
    @ApiModelProperty("密码")
    private String password;

    public void set(String username, String password, Date created,Date updated,String salt){
        super.setCreated(created);
        super.setUpdated(updated);
        this.username = username;
        this.password = password;
        this.salt = salt;
    }
}
